/** * 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 namespace Aws { namespace CloudTrail { namespace Model { /** */ class CreateEventDataStoreRequest : public CloudTrailRequest { public: AWS_CLOUDTRAIL_API CreateEventDataStoreRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateEventDataStore"; } AWS_CLOUDTRAIL_API Aws::String SerializePayload() const override; AWS_CLOUDTRAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The name of the event data store.

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

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline const Aws::Vector& GetAdvancedEventSelectors() const{ return m_advancedEventSelectors; } /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline bool AdvancedEventSelectorsHasBeenSet() const { return m_advancedEventSelectorsHasBeenSet; } /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline void SetAdvancedEventSelectors(const Aws::Vector& value) { m_advancedEventSelectorsHasBeenSet = true; m_advancedEventSelectors = value; } /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline void SetAdvancedEventSelectors(Aws::Vector&& value) { m_advancedEventSelectorsHasBeenSet = true; m_advancedEventSelectors = std::move(value); } /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline CreateEventDataStoreRequest& WithAdvancedEventSelectors(const Aws::Vector& value) { SetAdvancedEventSelectors(value); return *this;} /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline CreateEventDataStoreRequest& WithAdvancedEventSelectors(Aws::Vector&& value) { SetAdvancedEventSelectors(std::move(value)); return *this;} /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline CreateEventDataStoreRequest& AddAdvancedEventSelectors(const AdvancedEventSelector& value) { m_advancedEventSelectorsHasBeenSet = true; m_advancedEventSelectors.push_back(value); return *this; } /** *

The advanced event selectors to use to select the events for the data store. * You can configure up to five advanced event selectors for each event data * store.

For more information about how to use advanced event selectors to * log CloudTrail events, see Log * events by using advanced event selectors in the CloudTrail User Guide.

*

For more information about how to use advanced event selectors to include * Config configuration items in your event data store, see Create * an event data store for Config configuration items in the CloudTrail User * Guide.

For more information about how to use advanced event selectors to * include non-Amazon Web Services events in your event data store, see Create * an integration to log events from outside Amazon Web Services in the * CloudTrail User Guide.

*/ inline CreateEventDataStoreRequest& AddAdvancedEventSelectors(AdvancedEventSelector&& value) { m_advancedEventSelectorsHasBeenSet = true; m_advancedEventSelectors.push_back(std::move(value)); return *this; } /** *

Specifies whether the event data store includes events from all Regions, or * only from the Region in which the event data store is created.

*/ inline bool GetMultiRegionEnabled() const{ return m_multiRegionEnabled; } /** *

Specifies whether the event data store includes events from all Regions, or * only from the Region in which the event data store is created.

*/ inline bool MultiRegionEnabledHasBeenSet() const { return m_multiRegionEnabledHasBeenSet; } /** *

Specifies whether the event data store includes events from all Regions, or * only from the Region in which the event data store is created.

*/ inline void SetMultiRegionEnabled(bool value) { m_multiRegionEnabledHasBeenSet = true; m_multiRegionEnabled = value; } /** *

Specifies whether the event data store includes events from all Regions, or * only from the Region in which the event data store is created.

*/ inline CreateEventDataStoreRequest& WithMultiRegionEnabled(bool value) { SetMultiRegionEnabled(value); return *this;} /** *

Specifies whether an event data store collects events logged for an * organization in Organizations.

*/ inline bool GetOrganizationEnabled() const{ return m_organizationEnabled; } /** *

Specifies whether an event data store collects events logged for an * organization in Organizations.

*/ inline bool OrganizationEnabledHasBeenSet() const { return m_organizationEnabledHasBeenSet; } /** *

Specifies whether an event data store collects events logged for an * organization in Organizations.

*/ inline void SetOrganizationEnabled(bool value) { m_organizationEnabledHasBeenSet = true; m_organizationEnabled = value; } /** *

Specifies whether an event data store collects events logged for an * organization in Organizations.

*/ inline CreateEventDataStoreRequest& WithOrganizationEnabled(bool value) { SetOrganizationEnabled(value); return *this;} /** *

The retention period of the event data store, in days. You can set a * retention period of up to 2557 days, the equivalent of seven years.

*/ inline int GetRetentionPeriod() const{ return m_retentionPeriod; } /** *

The retention period of the event data store, in days. You can set a * retention period of up to 2557 days, the equivalent of seven years.

*/ inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; } /** *

The retention period of the event data store, in days. You can set a * retention period of up to 2557 days, the equivalent of seven years.

*/ inline void SetRetentionPeriod(int value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = value; } /** *

The retention period of the event data store, in days. You can set a * retention period of up to 2557 days, the equivalent of seven years.

*/ inline CreateEventDataStoreRequest& WithRetentionPeriod(int value) { SetRetentionPeriod(value); return *this;} /** *

Specifies whether termination protection is enabled for the event data store. * If termination protection is enabled, you cannot delete the event data store * until termination protection is disabled.

*/ inline bool GetTerminationProtectionEnabled() const{ return m_terminationProtectionEnabled; } /** *

Specifies whether termination protection is enabled for the event data store. * If termination protection is enabled, you cannot delete the event data store * until termination protection is disabled.

*/ inline bool TerminationProtectionEnabledHasBeenSet() const { return m_terminationProtectionEnabledHasBeenSet; } /** *

Specifies whether termination protection is enabled for the event data store. * If termination protection is enabled, you cannot delete the event data store * until termination protection is disabled.

*/ inline void SetTerminationProtectionEnabled(bool value) { m_terminationProtectionEnabledHasBeenSet = true; m_terminationProtectionEnabled = value; } /** *

Specifies whether termination protection is enabled for the event data store. * If termination protection is enabled, you cannot delete the event data store * until termination protection is disabled.

*/ inline CreateEventDataStoreRequest& WithTerminationProtectionEnabled(bool value) { SetTerminationProtectionEnabled(value); return *this;} inline const Aws::Vector& GetTagsList() const{ return m_tagsList; } inline bool TagsListHasBeenSet() const { return m_tagsListHasBeenSet; } inline void SetTagsList(const Aws::Vector& value) { m_tagsListHasBeenSet = true; m_tagsList = value; } inline void SetTagsList(Aws::Vector&& value) { m_tagsListHasBeenSet = true; m_tagsList = std::move(value); } inline CreateEventDataStoreRequest& WithTagsList(const Aws::Vector& value) { SetTagsList(value); return *this;} inline CreateEventDataStoreRequest& WithTagsList(Aws::Vector&& value) { SetTagsList(std::move(value)); return *this;} inline CreateEventDataStoreRequest& AddTagsList(const Tag& value) { m_tagsListHasBeenSet = true; m_tagsList.push_back(value); return *this; } inline CreateEventDataStoreRequest& AddTagsList(Tag&& value) { m_tagsListHasBeenSet = true; m_tagsList.push_back(std::move(value)); return *this; } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline CreateEventDataStoreRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline CreateEventDataStoreRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

Specifies the KMS key ID to use to encrypt the events delivered by * CloudTrail. The value can be an alias name prefixed by alias/, a * fully specified ARN to an alias, a fully specified ARN to a key, or a globally * unique identifier.

Disabling or deleting the KMS key, or * removing CloudTrail permissions on the key, prevents CloudTrail from logging * events to the event data store, and prevents users from querying the data in the * event data store that was encrypted with the key. After you associate an event * data store with a KMS key, the KMS key cannot be removed or changed. Before you * disable or delete a KMS key that you are using with an event data store, delete * or back up your event data store.

CloudTrail also supports * KMS multi-Region keys. For more information about multi-Region keys, see Using * multi-Region keys in the Key Management Service Developer Guide.

*

Examples:

  • alias/MyAliasName

  • *

    arn:aws:kms:us-east-2:123456789012:alias/MyAliasName

  • *
  • * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

  • 12345678-1234-1234-1234-123456789012

  • *
*/ inline CreateEventDataStoreRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

Specifies whether the event data store should start ingesting live events. * The default is true.

*/ inline bool GetStartIngestion() const{ return m_startIngestion; } /** *

Specifies whether the event data store should start ingesting live events. * The default is true.

*/ inline bool StartIngestionHasBeenSet() const { return m_startIngestionHasBeenSet; } /** *

Specifies whether the event data store should start ingesting live events. * The default is true.

*/ inline void SetStartIngestion(bool value) { m_startIngestionHasBeenSet = true; m_startIngestion = value; } /** *

Specifies whether the event data store should start ingesting live events. * The default is true.

*/ inline CreateEventDataStoreRequest& WithStartIngestion(bool value) { SetStartIngestion(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_advancedEventSelectors; bool m_advancedEventSelectorsHasBeenSet = false; bool m_multiRegionEnabled; bool m_multiRegionEnabledHasBeenSet = false; bool m_organizationEnabled; bool m_organizationEnabledHasBeenSet = false; int m_retentionPeriod; bool m_retentionPeriodHasBeenSet = false; bool m_terminationProtectionEnabled; bool m_terminationProtectionEnabledHasBeenSet = false; Aws::Vector m_tagsList; bool m_tagsListHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; bool m_startIngestion; bool m_startIngestionHasBeenSet = false; }; } // namespace Model } // namespace CloudTrail } // namespace Aws