/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Http { class HttpClient; class HttpClientFactory; } // namespace Http namespace Utils { template< typename R, typename E> class Outcome; namespace Threading { class Executor; } // namespace Threading } // namespace Utils namespace Auth { class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth namespace Client { class RetryStrategy; } // namespace Client namespace CloudTrail { namespace Model { class AddTagsRequest; class CreateTrailRequest; class DeleteTrailRequest; class DescribeTrailsRequest; class GetEventSelectorsRequest; class GetInsightSelectorsRequest; class GetTrailRequest; class GetTrailStatusRequest; class ListPublicKeysRequest; class ListTagsRequest; class ListTrailsRequest; class LookupEventsRequest; class PutEventSelectorsRequest; class PutInsightSelectorsRequest; class RemoveTagsRequest; class StartLoggingRequest; class StopLoggingRequest; class UpdateTrailRequest; typedef Aws::Utils::Outcome AddTagsOutcome; typedef Aws::Utils::Outcome CreateTrailOutcome; typedef Aws::Utils::Outcome DeleteTrailOutcome; typedef Aws::Utils::Outcome DescribeTrailsOutcome; typedef Aws::Utils::Outcome GetEventSelectorsOutcome; typedef Aws::Utils::Outcome GetInsightSelectorsOutcome; typedef Aws::Utils::Outcome GetTrailOutcome; typedef Aws::Utils::Outcome GetTrailStatusOutcome; typedef Aws::Utils::Outcome ListPublicKeysOutcome; typedef Aws::Utils::Outcome ListTagsOutcome; typedef Aws::Utils::Outcome ListTrailsOutcome; typedef Aws::Utils::Outcome LookupEventsOutcome; typedef Aws::Utils::Outcome PutEventSelectorsOutcome; typedef Aws::Utils::Outcome PutInsightSelectorsOutcome; typedef Aws::Utils::Outcome RemoveTagsOutcome; typedef Aws::Utils::Outcome StartLoggingOutcome; typedef Aws::Utils::Outcome StopLoggingOutcome; typedef Aws::Utils::Outcome UpdateTrailOutcome; typedef std::future AddTagsOutcomeCallable; typedef std::future CreateTrailOutcomeCallable; typedef std::future DeleteTrailOutcomeCallable; typedef std::future DescribeTrailsOutcomeCallable; typedef std::future GetEventSelectorsOutcomeCallable; typedef std::future GetInsightSelectorsOutcomeCallable; typedef std::future GetTrailOutcomeCallable; typedef std::future GetTrailStatusOutcomeCallable; typedef std::future ListPublicKeysOutcomeCallable; typedef std::future ListTagsOutcomeCallable; typedef std::future ListTrailsOutcomeCallable; typedef std::future LookupEventsOutcomeCallable; typedef std::future PutEventSelectorsOutcomeCallable; typedef std::future PutInsightSelectorsOutcomeCallable; typedef std::future RemoveTagsOutcomeCallable; typedef std::future StartLoggingOutcomeCallable; typedef std::future StopLoggingOutcomeCallable; typedef std::future UpdateTrailOutcomeCallable; } // namespace Model class CloudTrailClient; typedef std::function&) > AddTagsResponseReceivedHandler; typedef std::function&) > CreateTrailResponseReceivedHandler; typedef std::function&) > DeleteTrailResponseReceivedHandler; typedef std::function&) > DescribeTrailsResponseReceivedHandler; typedef std::function&) > GetEventSelectorsResponseReceivedHandler; typedef std::function&) > GetInsightSelectorsResponseReceivedHandler; typedef std::function&) > GetTrailResponseReceivedHandler; typedef std::function&) > GetTrailStatusResponseReceivedHandler; typedef std::function&) > ListPublicKeysResponseReceivedHandler; typedef std::function&) > ListTagsResponseReceivedHandler; typedef std::function&) > ListTrailsResponseReceivedHandler; typedef std::function&) > LookupEventsResponseReceivedHandler; typedef std::function&) > PutEventSelectorsResponseReceivedHandler; typedef std::function&) > PutInsightSelectorsResponseReceivedHandler; typedef std::function&) > RemoveTagsResponseReceivedHandler; typedef std::function&) > StartLoggingResponseReceivedHandler; typedef std::function&) > StopLoggingResponseReceivedHandler; typedef std::function&) > UpdateTrailResponseReceivedHandler; /** * AWS CloudTrail

This is the CloudTrail API Reference. It * provides descriptions of actions, data types, common parameters, and common * errors for CloudTrail.

CloudTrail is a web service that records AWS API * calls for your AWS account and delivers log files to an Amazon S3 bucket. The * recorded information includes the identity of the user, the start time of the * AWS API call, the source IP address, the request parameters, and the response * elements returned by the service.

As an alternative to the API, * you can use one of the AWS SDKs, which consist of libraries and sample code for * various programming languages and platforms (Java, Ruby, .NET, iOS, Android, * etc.). The SDKs provide a convenient way to create programmatic access to * AWSCloudTrail. For example, the SDKs take care of cryptographically signing * requests, managing errors, and retrying requests automatically. For information * about the AWS SDKs, including how to download and install them, see the Tools for Amazon Web Services page.

*

See the AWS * CloudTrail User Guide for information about the data that is included with * each AWS API call listed in the log files.

*/ class AWS_CLOUDTRAIL_API CloudTrailClient : public Aws::Client::AWSJsonClient { public: typedef Aws::Client::AWSJsonClient BASECLASS; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CloudTrailClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ CloudTrailClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ CloudTrailClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~CloudTrailClient(); /** *

Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing * tag's value when a new value is specified for an existing tag key. Tag key names * must be unique for a trail; you cannot have two keys with the same name but * different values. If you specify a key without a value, the tag will be created * with the specified key and a value of null. You can tag a trail that applies to * all AWS Regions only from the Region in which the trail was created (also known * as its home region).

See Also:

AWS * API Reference

*/ virtual Model::AddTagsOutcome AddTags(const Model::AddTagsRequest& request) const; /** *

Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing * tag's value when a new value is specified for an existing tag key. Tag key names * must be unique for a trail; you cannot have two keys with the same name but * different values. If you specify a key without a value, the tag will be created * with the specified key and a value of null. You can tag a trail that applies to * all AWS Regions only from the Region in which the trail was created (also known * as its home region).

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::AddTagsOutcomeCallable AddTagsCallable(const Model::AddTagsRequest& request) const; /** *

Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing * tag's value when a new value is specified for an existing tag key. Tag key names * must be unique for a trail; you cannot have two keys with the same name but * different values. If you specify a key without a value, the tag will be created * with the specified key and a value of null. You can tag a trail that applies to * all AWS Regions only from the Region in which the trail was created (also known * as its home region).

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void AddTagsAsync(const Model::AddTagsRequest& request, const AddTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Creates a trail that specifies the settings for delivery of log data to an * Amazon S3 bucket.

See Also:

AWS * API Reference

*/ virtual Model::CreateTrailOutcome CreateTrail(const Model::CreateTrailRequest& request) const; /** *

Creates a trail that specifies the settings for delivery of log data to an * Amazon S3 bucket.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::CreateTrailOutcomeCallable CreateTrailCallable(const Model::CreateTrailRequest& request) const; /** *

Creates a trail that specifies the settings for delivery of log data to an * Amazon S3 bucket.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void CreateTrailAsync(const Model::CreateTrailRequest& request, const CreateTrailResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Deletes a trail. This operation must be called from the region in which the * trail was created. DeleteTrail cannot be called on the shadow * trails (replicated trails in other regions) of a trail that is enabled in all * regions.

See Also:

AWS * API Reference

*/ virtual Model::DeleteTrailOutcome DeleteTrail(const Model::DeleteTrailRequest& request) const; /** *

Deletes a trail. This operation must be called from the region in which the * trail was created. DeleteTrail cannot be called on the shadow * trails (replicated trails in other regions) of a trail that is enabled in all * regions.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DeleteTrailOutcomeCallable DeleteTrailCallable(const Model::DeleteTrailRequest& request) const; /** *

Deletes a trail. This operation must be called from the region in which the * trail was created. DeleteTrail cannot be called on the shadow * trails (replicated trails in other regions) of a trail that is enabled in all * regions.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DeleteTrailAsync(const Model::DeleteTrailRequest& request, const DeleteTrailResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Retrieves settings for one or more trails associated with the current region * for your account.

See Also:

AWS * API Reference

*/ virtual Model::DescribeTrailsOutcome DescribeTrails(const Model::DescribeTrailsRequest& request) const; /** *

Retrieves settings for one or more trails associated with the current region * for your account.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DescribeTrailsOutcomeCallable DescribeTrailsCallable(const Model::DescribeTrailsRequest& request) const; /** *

Retrieves settings for one or more trails associated with the current region * for your account.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DescribeTrailsAsync(const Model::DescribeTrailsRequest& request, const DescribeTrailsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Describes the settings for the event selectors that you configured for your * trail. The information returned for your event selectors includes the * following:

  • If your event selector includes read-only events, * write-only events, or all events. This applies to both management events and * data events.

  • If your event selector includes management * events.

  • If your event selector includes data events, the * Amazon S3 objects or AWS Lambda functions that you are logging for data * events.

For more information, see Logging * Data and Management Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

*/ virtual Model::GetEventSelectorsOutcome GetEventSelectors(const Model::GetEventSelectorsRequest& request) const; /** *

Describes the settings for the event selectors that you configured for your * trail. The information returned for your event selectors includes the * following:

  • If your event selector includes read-only events, * write-only events, or all events. This applies to both management events and * data events.

  • If your event selector includes management * events.

  • If your event selector includes data events, the * Amazon S3 objects or AWS Lambda functions that you are logging for data * events.

For more information, see Logging * Data and Management Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetEventSelectorsOutcomeCallable GetEventSelectorsCallable(const Model::GetEventSelectorsRequest& request) const; /** *

Describes the settings for the event selectors that you configured for your * trail. The information returned for your event selectors includes the * following:

  • If your event selector includes read-only events, * write-only events, or all events. This applies to both management events and * data events.

  • If your event selector includes management * events.

  • If your event selector includes data events, the * Amazon S3 objects or AWS Lambda functions that you are logging for data * events.

For more information, see Logging * Data and Management Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetEventSelectorsAsync(const Model::GetEventSelectorsRequest& request, const GetEventSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Describes the settings for the Insights event selectors that you configured * for your trail. GetInsightSelectors shows if CloudTrail Insights * event logging is enabled on the trail, and if it is, which insight types are * enabled. If you run GetInsightSelectors on a trail that does not * have Insights events enabled, the operation throws the exception * InsightNotEnabledException

For more information, see Logging * CloudTrail Insights Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

*/ virtual Model::GetInsightSelectorsOutcome GetInsightSelectors(const Model::GetInsightSelectorsRequest& request) const; /** *

Describes the settings for the Insights event selectors that you configured * for your trail. GetInsightSelectors shows if CloudTrail Insights * event logging is enabled on the trail, and if it is, which insight types are * enabled. If you run GetInsightSelectors on a trail that does not * have Insights events enabled, the operation throws the exception * InsightNotEnabledException

For more information, see Logging * CloudTrail Insights Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetInsightSelectorsOutcomeCallable GetInsightSelectorsCallable(const Model::GetInsightSelectorsRequest& request) const; /** *

Describes the settings for the Insights event selectors that you configured * for your trail. GetInsightSelectors shows if CloudTrail Insights * event logging is enabled on the trail, and if it is, which insight types are * enabled. If you run GetInsightSelectors on a trail that does not * have Insights events enabled, the operation throws the exception * InsightNotEnabledException

For more information, see Logging * CloudTrail Insights Events for Trails in the AWS CloudTrail User * Guide.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetInsightSelectorsAsync(const Model::GetInsightSelectorsRequest& request, const GetInsightSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns settings information for a specified trail.

See Also:

* AWS * API Reference

*/ virtual Model::GetTrailOutcome GetTrail(const Model::GetTrailRequest& request) const; /** *

Returns settings information for a specified trail.

See Also:

* AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetTrailOutcomeCallable GetTrailCallable(const Model::GetTrailRequest& request) const; /** *

Returns settings information for a specified trail.

See Also:

* AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetTrailAsync(const Model::GetTrailRequest& request, const GetTrailResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns a JSON-formatted list of information about the specified trail. * Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, * and start and stop logging times for each trail. This operation returns trail * status from a single region. To return trail status from all regions, you must * call the operation on each region.

See Also:

AWS * API Reference

*/ virtual Model::GetTrailStatusOutcome GetTrailStatus(const Model::GetTrailStatusRequest& request) const; /** *

Returns a JSON-formatted list of information about the specified trail. * Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, * and start and stop logging times for each trail. This operation returns trail * status from a single region. To return trail status from all regions, you must * call the operation on each region.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetTrailStatusOutcomeCallable GetTrailStatusCallable(const Model::GetTrailStatusRequest& request) const; /** *

Returns a JSON-formatted list of information about the specified trail. * Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, * and start and stop logging times for each trail. This operation returns trail * status from a single region. To return trail status from all regions, you must * call the operation on each region.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetTrailStatusAsync(const Model::GetTrailStatusRequest& request, const GetTrailStatusResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns all public keys whose private keys were used to sign the digest files * within the specified time range. The public key is needed to validate digest * files that were signed with its corresponding private key.

*

CloudTrail uses different private/public key pairs per region. Each digest * file is signed with a private key unique to its region. Therefore, when you * validate a digest file from a particular region, you must look in the same * region for its corresponding public key.

See Also:

AWS * API Reference

*/ virtual Model::ListPublicKeysOutcome ListPublicKeys(const Model::ListPublicKeysRequest& request) const; /** *

Returns all public keys whose private keys were used to sign the digest files * within the specified time range. The public key is needed to validate digest * files that were signed with its corresponding private key.

*

CloudTrail uses different private/public key pairs per region. Each digest * file is signed with a private key unique to its region. Therefore, when you * validate a digest file from a particular region, you must look in the same * region for its corresponding public key.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListPublicKeysOutcomeCallable ListPublicKeysCallable(const Model::ListPublicKeysRequest& request) const; /** *

Returns all public keys whose private keys were used to sign the digest files * within the specified time range. The public key is needed to validate digest * files that were signed with its corresponding private key.

*

CloudTrail uses different private/public key pairs per region. Each digest * file is signed with a private key unique to its region. Therefore, when you * validate a digest file from a particular region, you must look in the same * region for its corresponding public key.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListPublicKeysAsync(const Model::ListPublicKeysRequest& request, const ListPublicKeysResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Lists the tags for the trail in the current region.

See Also:

* AWS * API Reference

*/ virtual Model::ListTagsOutcome ListTags(const Model::ListTagsRequest& request) const; /** *

Lists the tags for the trail in the current region.

See Also:

* AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListTagsOutcomeCallable ListTagsCallable(const Model::ListTagsRequest& request) const; /** *

Lists the tags for the trail in the current region.

See Also:

* AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListTagsAsync(const Model::ListTagsRequest& request, const ListTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Lists trails that are in the current account.

See Also:

AWS * API Reference

*/ virtual Model::ListTrailsOutcome ListTrails(const Model::ListTrailsRequest& request) const; /** *

Lists trails that are in the current account.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListTrailsOutcomeCallable ListTrailsCallable(const Model::ListTrailsRequest& request) const; /** *

Lists trails that are in the current account.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListTrailsAsync(const Model::ListTrailsRequest& request, const ListTrailsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Looks up management * events or CloudTrail * Insights events that are captured by CloudTrail. You can look up events that * occurred in a region within the last 90 days. Lookup supports the following * attributes for management events:

  • AWS access key

  • *

    Event ID

  • Event name

  • Event source

    *
  • Read only

  • Resource name

  • *

    Resource type

  • User name

Lookup supports * the following attributes for Insights events:

  • Event ID

    *
  • Event name

  • Event source

All * attributes are optional. The default number of results returned is 50, with a * maximum of 50 possible. The response includes a token that you can use to get * the next page of results.

The rate of lookup requests is * limited to two per second per account. If this limit is exceeded, a throttling * error occurs.

See Also:

AWS * API Reference

*/ virtual Model::LookupEventsOutcome LookupEvents(const Model::LookupEventsRequest& request) const; /** *

Looks up management * events or CloudTrail * Insights events that are captured by CloudTrail. You can look up events that * occurred in a region within the last 90 days. Lookup supports the following * attributes for management events:

  • AWS access key

  • *

    Event ID

  • Event name

  • Event source

    *
  • Read only

  • Resource name

  • *

    Resource type

  • User name

Lookup supports * the following attributes for Insights events:

  • Event ID

    *
  • Event name

  • Event source

All * attributes are optional. The default number of results returned is 50, with a * maximum of 50 possible. The response includes a token that you can use to get * the next page of results.

The rate of lookup requests is * limited to two per second per account. If this limit is exceeded, a throttling * error occurs.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::LookupEventsOutcomeCallable LookupEventsCallable(const Model::LookupEventsRequest& request) const; /** *

Looks up management * events or CloudTrail * Insights events that are captured by CloudTrail. You can look up events that * occurred in a region within the last 90 days. Lookup supports the following * attributes for management events:

  • AWS access key

  • *

    Event ID

  • Event name

  • Event source

    *
  • Read only

  • Resource name

  • *

    Resource type

  • User name

Lookup supports * the following attributes for Insights events:

  • Event ID

    *
  • Event name

  • Event source

All * attributes are optional. The default number of results returned is 50, with a * maximum of 50 possible. The response includes a token that you can use to get * the next page of results.

The rate of lookup requests is * limited to two per second per account. If this limit is exceeded, a throttling * error occurs.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void LookupEventsAsync(const Model::LookupEventsRequest& request, const LookupEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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.

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.

Example

  1. You create an event selector for * a trail and specify that you want write-only events.

  2. The EC2 * GetConsoleOutput and RunInstances API operations occur * in your account.

  3. CloudTrail evaluates whether the events match * your event selectors.

  4. The RunInstances is a * write-only event and it matches your event selector. The trail logs the * event.

  5. The GetConsoleOutput is a read-only event * but it doesn't match your event selector. The trail doesn't log the event.

    *

The PutEventSelectors operation must be called from * the region in which the trail was created; otherwise, an * InvalidHomeRegionException is thrown.

You can configure up * to five event selectors for each trail. For more information, see Logging * Data and Management Events for Trails and Limits * in AWS CloudTrail in the AWS CloudTrail User Guide.

See * Also:

AWS * API Reference

*/ virtual Model::PutEventSelectorsOutcome PutEventSelectors(const Model::PutEventSelectorsRequest& request) const; /** *

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.

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.

Example

  1. You create an event selector for * a trail and specify that you want write-only events.

  2. The EC2 * GetConsoleOutput and RunInstances API operations occur * in your account.

  3. CloudTrail evaluates whether the events match * your event selectors.

  4. The RunInstances is a * write-only event and it matches your event selector. The trail logs the * event.

  5. The GetConsoleOutput is a read-only event * but it doesn't match your event selector. The trail doesn't log the event.

    *

The PutEventSelectors operation must be called from * the region in which the trail was created; otherwise, an * InvalidHomeRegionException is thrown.

You can configure up * to five event selectors for each trail. For more information, see Logging * Data and Management Events for Trails and Limits * in AWS CloudTrail in the AWS CloudTrail User Guide.

See * Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::PutEventSelectorsOutcomeCallable PutEventSelectorsCallable(const Model::PutEventSelectorsRequest& request) const; /** *

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.

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.

Example

  1. You create an event selector for * a trail and specify that you want write-only events.

  2. The EC2 * GetConsoleOutput and RunInstances API operations occur * in your account.

  3. CloudTrail evaluates whether the events match * your event selectors.

  4. The RunInstances is a * write-only event and it matches your event selector. The trail logs the * event.

  5. The GetConsoleOutput is a read-only event * but it doesn't match your event selector. The trail doesn't log the event.

    *

The PutEventSelectors operation must be called from * the region in which the trail was created; otherwise, an * InvalidHomeRegionException is thrown.

You can configure up * to five event selectors for each trail. For more information, see Logging * Data and Management Events for Trails and Limits * in AWS CloudTrail in the AWS CloudTrail User Guide.

See * Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void PutEventSelectorsAsync(const Model::PutEventSelectorsRequest& request, const PutEventSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Lets you enable Insights event logging by specifying the Insights selectors * that you want to enable on an existing trail. You also use * PutInsightSelectors to turn off Insights event logging, by passing * an empty list of insight types. In this release, only * ApiCallRateInsight is supported as an Insights * selector.

See Also:

AWS * API Reference

*/ virtual Model::PutInsightSelectorsOutcome PutInsightSelectors(const Model::PutInsightSelectorsRequest& request) const; /** *

Lets you enable Insights event logging by specifying the Insights selectors * that you want to enable on an existing trail. You also use * PutInsightSelectors to turn off Insights event logging, by passing * an empty list of insight types. In this release, only * ApiCallRateInsight is supported as an Insights * selector.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::PutInsightSelectorsOutcomeCallable PutInsightSelectorsCallable(const Model::PutInsightSelectorsRequest& request) const; /** *

Lets you enable Insights event logging by specifying the Insights selectors * that you want to enable on an existing trail. You also use * PutInsightSelectors to turn off Insights event logging, by passing * an empty list of insight types. In this release, only * ApiCallRateInsight is supported as an Insights * selector.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void PutInsightSelectorsAsync(const Model::PutInsightSelectorsRequest& request, const PutInsightSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Removes the specified tags from a trail.

See Also:

AWS * API Reference

*/ virtual Model::RemoveTagsOutcome RemoveTags(const Model::RemoveTagsRequest& request) const; /** *

Removes the specified tags from a trail.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::RemoveTagsOutcomeCallable RemoveTagsCallable(const Model::RemoveTagsRequest& request) const; /** *

Removes the specified tags from a trail.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void RemoveTagsAsync(const Model::RemoveTagsRequest& request, const RemoveTagsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Starts the recording of AWS API calls and log file delivery for a trail. For * a trail that is enabled in all regions, this operation must be called from the * region in which the trail was created. This operation cannot be called on the * shadow trails (replicated trails in other regions) of a trail that is enabled in * all regions.

See Also:

AWS * API Reference

*/ virtual Model::StartLoggingOutcome StartLogging(const Model::StartLoggingRequest& request) const; /** *

Starts the recording of AWS API calls and log file delivery for a trail. For * a trail that is enabled in all regions, this operation must be called from the * region in which the trail was created. This operation cannot be called on the * shadow trails (replicated trails in other regions) of a trail that is enabled in * all regions.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::StartLoggingOutcomeCallable StartLoggingCallable(const Model::StartLoggingRequest& request) const; /** *

Starts the recording of AWS API calls and log file delivery for a trail. For * a trail that is enabled in all regions, this operation must be called from the * region in which the trail was created. This operation cannot be called on the * shadow trails (replicated trails in other regions) of a trail that is enabled in * all regions.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void StartLoggingAsync(const Model::StartLoggingRequest& request, const StartLoggingResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Suspends the recording of AWS API calls and log file delivery for the * specified trail. Under most circumstances, there is no need to use this action. * You can update a trail without stopping it first. This action is the only way to * stop recording. For a trail enabled in all regions, this operation must be * called from the region in which the trail was created, or an * InvalidHomeRegionException will occur. This operation cannot be * called on the shadow trails (replicated trails in other regions) of a trail * enabled in all regions.

See Also:

AWS * API Reference

*/ virtual Model::StopLoggingOutcome StopLogging(const Model::StopLoggingRequest& request) const; /** *

Suspends the recording of AWS API calls and log file delivery for the * specified trail. Under most circumstances, there is no need to use this action. * You can update a trail without stopping it first. This action is the only way to * stop recording. For a trail enabled in all regions, this operation must be * called from the region in which the trail was created, or an * InvalidHomeRegionException will occur. This operation cannot be * called on the shadow trails (replicated trails in other regions) of a trail * enabled in all regions.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::StopLoggingOutcomeCallable StopLoggingCallable(const Model::StopLoggingRequest& request) const; /** *

Suspends the recording of AWS API calls and log file delivery for the * specified trail. Under most circumstances, there is no need to use this action. * You can update a trail without stopping it first. This action is the only way to * stop recording. For a trail enabled in all regions, this operation must be * called from the region in which the trail was created, or an * InvalidHomeRegionException will occur. This operation cannot be * called on the shadow trails (replicated trails in other regions) of a trail * enabled in all regions.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void StopLoggingAsync(const Model::StopLoggingRequest& request, const StopLoggingResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Updates the settings that specify delivery of log files. Changes to a trail * do not require stopping the CloudTrail service. Use this action to designate an * existing bucket for log delivery. If the existing bucket has previously been a * target for CloudTrail log files, an IAM policy exists for the bucket. * UpdateTrail must be called from the region in which the trail was * created; otherwise, an InvalidHomeRegionException is * thrown.

See Also:

AWS * API Reference

*/ virtual Model::UpdateTrailOutcome UpdateTrail(const Model::UpdateTrailRequest& request) const; /** *

Updates the settings that specify delivery of log files. Changes to a trail * do not require stopping the CloudTrail service. Use this action to designate an * existing bucket for log delivery. If the existing bucket has previously been a * target for CloudTrail log files, an IAM policy exists for the bucket. * UpdateTrail must be called from the region in which the trail was * created; otherwise, an InvalidHomeRegionException is * thrown.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::UpdateTrailOutcomeCallable UpdateTrailCallable(const Model::UpdateTrailRequest& request) const; /** *

Updates the settings that specify delivery of log files. Changes to a trail * do not require stopping the CloudTrail service. Use this action to designate an * existing bucket for log delivery. If the existing bucket has previously been a * target for CloudTrail log files, an IAM policy exists for the bucket. * UpdateTrail must be called from the region in which the trail was * created; otherwise, an InvalidHomeRegionException is * thrown.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void UpdateTrailAsync(const Model::UpdateTrailRequest& request, const UpdateTrailResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void AddTagsAsyncHelper(const Model::AddTagsRequest& request, const AddTagsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void CreateTrailAsyncHelper(const Model::CreateTrailRequest& request, const CreateTrailResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteTrailAsyncHelper(const Model::DeleteTrailRequest& request, const DeleteTrailResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DescribeTrailsAsyncHelper(const Model::DescribeTrailsRequest& request, const DescribeTrailsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetEventSelectorsAsyncHelper(const Model::GetEventSelectorsRequest& request, const GetEventSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetInsightSelectorsAsyncHelper(const Model::GetInsightSelectorsRequest& request, const GetInsightSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetTrailAsyncHelper(const Model::GetTrailRequest& request, const GetTrailResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetTrailStatusAsyncHelper(const Model::GetTrailStatusRequest& request, const GetTrailStatusResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListPublicKeysAsyncHelper(const Model::ListPublicKeysRequest& request, const ListPublicKeysResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListTagsAsyncHelper(const Model::ListTagsRequest& request, const ListTagsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListTrailsAsyncHelper(const Model::ListTrailsRequest& request, const ListTrailsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void LookupEventsAsyncHelper(const Model::LookupEventsRequest& request, const LookupEventsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void PutEventSelectorsAsyncHelper(const Model::PutEventSelectorsRequest& request, const PutEventSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void PutInsightSelectorsAsyncHelper(const Model::PutInsightSelectorsRequest& request, const PutInsightSelectorsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void RemoveTagsAsyncHelper(const Model::RemoveTagsRequest& request, const RemoveTagsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void StartLoggingAsyncHelper(const Model::StartLoggingRequest& request, const StartLoggingResponseReceivedHandler& handler, const std::shared_ptr& context) const; void StopLoggingAsyncHelper(const Model::StopLoggingRequest& request, const StopLoggingResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UpdateTrailAsyncHelper(const Model::UpdateTrailRequest& request, const UpdateTrailResponseReceivedHandler& handler, const std::shared_ptr& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr m_executor; }; } // namespace CloudTrail } // namespace Aws