/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudTrail { namespace Model { /** *

Advanced event selectors let you create fine-grained selectors for the * following CloudTrail event record fields. They help you control costs by logging * only those events that are important to you. For more information about advanced * event selectors, see Logging * data events in the CloudTrail User Guide.

  • * readOnly

  • eventSource

  • *
  • eventName

  • eventCategory *

  • resources.type

  • * resources.ARN

You cannot apply both event * selectors and advanced event selectors to a trail.

See Also:

AWS * API Reference

*/ class AdvancedEventSelector { public: AWS_CLOUDTRAIL_API AdvancedEventSelector(); AWS_CLOUDTRAIL_API AdvancedEventSelector(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDTRAIL_API AdvancedEventSelector& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDTRAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline AdvancedEventSelector& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline AdvancedEventSelector& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

An optional, descriptive name for an advanced event selector, such as "Log * data events for only two S3 buckets".

*/ inline AdvancedEventSelector& WithName(const char* value) { SetName(value); return *this;} /** *

Contains all selector statements in an advanced event selector.

*/ inline const Aws::Vector& GetFieldSelectors() const{ return m_fieldSelectors; } /** *

Contains all selector statements in an advanced event selector.

*/ inline bool FieldSelectorsHasBeenSet() const { return m_fieldSelectorsHasBeenSet; } /** *

Contains all selector statements in an advanced event selector.

*/ inline void SetFieldSelectors(const Aws::Vector& value) { m_fieldSelectorsHasBeenSet = true; m_fieldSelectors = value; } /** *

Contains all selector statements in an advanced event selector.

*/ inline void SetFieldSelectors(Aws::Vector&& value) { m_fieldSelectorsHasBeenSet = true; m_fieldSelectors = std::move(value); } /** *

Contains all selector statements in an advanced event selector.

*/ inline AdvancedEventSelector& WithFieldSelectors(const Aws::Vector& value) { SetFieldSelectors(value); return *this;} /** *

Contains all selector statements in an advanced event selector.

*/ inline AdvancedEventSelector& WithFieldSelectors(Aws::Vector&& value) { SetFieldSelectors(std::move(value)); return *this;} /** *

Contains all selector statements in an advanced event selector.

*/ inline AdvancedEventSelector& AddFieldSelectors(const AdvancedFieldSelector& value) { m_fieldSelectorsHasBeenSet = true; m_fieldSelectors.push_back(value); return *this; } /** *

Contains all selector statements in an advanced event selector.

*/ inline AdvancedEventSelector& AddFieldSelectors(AdvancedFieldSelector&& value) { m_fieldSelectorsHasBeenSet = true; m_fieldSelectors.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_fieldSelectors; bool m_fieldSelectorsHasBeenSet = false; }; } // namespace Model } // namespace CloudTrail } // namespace Aws