/** * 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 Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace Redshift { namespace Model { /** *

Describes event subscriptions.

See Also:

AWS * API Reference

*/ class AWS_REDSHIFT_API EventSubscription { public: EventSubscription(); EventSubscription(const Aws::Utils::Xml::XmlNode& xmlNode); EventSubscription& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline const Aws::String& GetCustomerAwsId() const{ return m_customerAwsId; } /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline bool CustomerAwsIdHasBeenSet() const { return m_customerAwsIdHasBeenSet; } /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline void SetCustomerAwsId(const Aws::String& value) { m_customerAwsIdHasBeenSet = true; m_customerAwsId = value; } /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline void SetCustomerAwsId(Aws::String&& value) { m_customerAwsIdHasBeenSet = true; m_customerAwsId = std::move(value); } /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline void SetCustomerAwsId(const char* value) { m_customerAwsIdHasBeenSet = true; m_customerAwsId.assign(value); } /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& WithCustomerAwsId(const Aws::String& value) { SetCustomerAwsId(value); return *this;} /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& WithCustomerAwsId(Aws::String&& value) { SetCustomerAwsId(std::move(value)); return *this;} /** *

The AWS customer account associated with the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& WithCustomerAwsId(const char* value) { SetCustomerAwsId(value); return *this;} /** *

The name of the Amazon Redshift event notification subscription.

*/ inline const Aws::String& GetCustSubscriptionId() const{ return m_custSubscriptionId; } /** *

The name of the Amazon Redshift event notification subscription.

*/ inline bool CustSubscriptionIdHasBeenSet() const { return m_custSubscriptionIdHasBeenSet; } /** *

The name of the Amazon Redshift event notification subscription.

*/ inline void SetCustSubscriptionId(const Aws::String& value) { m_custSubscriptionIdHasBeenSet = true; m_custSubscriptionId = value; } /** *

The name of the Amazon Redshift event notification subscription.

*/ inline void SetCustSubscriptionId(Aws::String&& value) { m_custSubscriptionIdHasBeenSet = true; m_custSubscriptionId = std::move(value); } /** *

The name of the Amazon Redshift event notification subscription.

*/ inline void SetCustSubscriptionId(const char* value) { m_custSubscriptionIdHasBeenSet = true; m_custSubscriptionId.assign(value); } /** *

The name of the Amazon Redshift event notification subscription.

*/ inline EventSubscription& WithCustSubscriptionId(const Aws::String& value) { SetCustSubscriptionId(value); return *this;} /** *

The name of the Amazon Redshift event notification subscription.

*/ inline EventSubscription& WithCustSubscriptionId(Aws::String&& value) { SetCustSubscriptionId(std::move(value)); return *this;} /** *

The name of the Amazon Redshift event notification subscription.

*/ inline EventSubscription& WithCustSubscriptionId(const char* value) { SetCustSubscriptionId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline const Aws::String& GetSnsTopicArn() const{ return m_snsTopicArn; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline bool SnsTopicArnHasBeenSet() const { return m_snsTopicArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline void SetSnsTopicArn(const Aws::String& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline void SetSnsTopicArn(Aws::String&& value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline void SetSnsTopicArn(const char* value) { m_snsTopicArnHasBeenSet = true; m_snsTopicArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline EventSubscription& WithSnsTopicArn(const Aws::String& value) { SetSnsTopicArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline EventSubscription& WithSnsTopicArn(Aws::String&& value) { SetSnsTopicArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Amazon SNS topic used by the event * notification subscription.

*/ inline EventSubscription& WithSnsTopicArn(const char* value) { SetSnsTopicArn(value); return *this;} /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline EventSubscription& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline EventSubscription& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status of the Amazon Redshift event notification subscription.

*

Constraints:

  • Can be one of the following: active | * no-permission | topic-not-exist

  • The status "no-permission" * indicates that Amazon Redshift no longer has permission to post to the Amazon * SNS topic. The status "topic-not-exist" indicates that the topic was deleted * after the subscription was created.

*/ inline EventSubscription& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline const Aws::Utils::DateTime& GetSubscriptionCreationTime() const{ return m_subscriptionCreationTime; } /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline bool SubscriptionCreationTimeHasBeenSet() const { return m_subscriptionCreationTimeHasBeenSet; } /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline void SetSubscriptionCreationTime(const Aws::Utils::DateTime& value) { m_subscriptionCreationTimeHasBeenSet = true; m_subscriptionCreationTime = value; } /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline void SetSubscriptionCreationTime(Aws::Utils::DateTime&& value) { m_subscriptionCreationTimeHasBeenSet = true; m_subscriptionCreationTime = std::move(value); } /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline EventSubscription& WithSubscriptionCreationTime(const Aws::Utils::DateTime& value) { SetSubscriptionCreationTime(value); return *this;} /** *

The date and time the Amazon Redshift event notification subscription was * created.

*/ inline EventSubscription& WithSubscriptionCreationTime(Aws::Utils::DateTime&& value) { SetSubscriptionCreationTime(std::move(value)); return *this;} /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline const Aws::String& GetSourceType() const{ return m_sourceType; } /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline bool SourceTypeHasBeenSet() const { return m_sourceTypeHasBeenSet; } /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline void SetSourceType(const Aws::String& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; } /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline void SetSourceType(Aws::String&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = std::move(value); } /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline void SetSourceType(const char* value) { m_sourceTypeHasBeenSet = true; m_sourceType.assign(value); } /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline EventSubscription& WithSourceType(const Aws::String& value) { SetSourceType(value); return *this;} /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline EventSubscription& WithSourceType(Aws::String&& value) { SetSourceType(std::move(value)); return *this;} /** *

The source type of the events returned by the Amazon Redshift event * notification, such as cluster, cluster-snapshot, cluster-parameter-group, * cluster-security-group, or scheduled-action.

*/ inline EventSubscription& WithSourceType(const char* value) { SetSourceType(value); return *this;} /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline const Aws::Vector& GetSourceIdsList() const{ return m_sourceIdsList; } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline bool SourceIdsListHasBeenSet() const { return m_sourceIdsListHasBeenSet; } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline void SetSourceIdsList(const Aws::Vector& value) { m_sourceIdsListHasBeenSet = true; m_sourceIdsList = value; } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline void SetSourceIdsList(Aws::Vector&& value) { m_sourceIdsListHasBeenSet = true; m_sourceIdsList = std::move(value); } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& WithSourceIdsList(const Aws::Vector& value) { SetSourceIdsList(value); return *this;} /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& WithSourceIdsList(Aws::Vector&& value) { SetSourceIdsList(std::move(value)); return *this;} /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& AddSourceIdsList(const Aws::String& value) { m_sourceIdsListHasBeenSet = true; m_sourceIdsList.push_back(value); return *this; } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& AddSourceIdsList(Aws::String&& value) { m_sourceIdsListHasBeenSet = true; m_sourceIdsList.push_back(std::move(value)); return *this; } /** *

A list of the sources that publish events to the Amazon Redshift event * notification subscription.

*/ inline EventSubscription& AddSourceIdsList(const char* value) { m_sourceIdsListHasBeenSet = true; m_sourceIdsList.push_back(value); return *this; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline const Aws::Vector& GetEventCategoriesList() const{ return m_eventCategoriesList; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline bool EventCategoriesListHasBeenSet() const { return m_eventCategoriesListHasBeenSet; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline void SetEventCategoriesList(const Aws::Vector& value) { m_eventCategoriesListHasBeenSet = true; m_eventCategoriesList = value; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline void SetEventCategoriesList(Aws::Vector&& value) { m_eventCategoriesListHasBeenSet = true; m_eventCategoriesList = std::move(value); } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline EventSubscription& WithEventCategoriesList(const Aws::Vector& value) { SetEventCategoriesList(value); return *this;} /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline EventSubscription& WithEventCategoriesList(Aws::Vector&& value) { SetEventCategoriesList(std::move(value)); return *this;} /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline EventSubscription& AddEventCategoriesList(const Aws::String& value) { m_eventCategoriesListHasBeenSet = true; m_eventCategoriesList.push_back(value); return *this; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline EventSubscription& AddEventCategoriesList(Aws::String&& value) { m_eventCategoriesListHasBeenSet = true; m_eventCategoriesList.push_back(std::move(value)); return *this; } /** *

The list of Amazon Redshift event categories specified in the event * notification subscription.

Values: Configuration, Management, Monitoring, * Security

*/ inline EventSubscription& AddEventCategoriesList(const char* value) { m_eventCategoriesListHasBeenSet = true; m_eventCategoriesList.push_back(value); return *this; } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline const Aws::String& GetSeverity() const{ return m_severity; } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline bool SeverityHasBeenSet() const { return m_severityHasBeenSet; } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline void SetSeverity(const Aws::String& value) { m_severityHasBeenSet = true; m_severity = value; } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline void SetSeverity(Aws::String&& value) { m_severityHasBeenSet = true; m_severity = std::move(value); } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline void SetSeverity(const char* value) { m_severityHasBeenSet = true; m_severity.assign(value); } /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline EventSubscription& WithSeverity(const Aws::String& value) { SetSeverity(value); return *this;} /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline EventSubscription& WithSeverity(Aws::String&& value) { SetSeverity(std::move(value)); return *this;} /** *

The event severity specified in the Amazon Redshift event notification * subscription.

Values: ERROR, INFO

*/ inline EventSubscription& WithSeverity(const char* value) { SetSeverity(value); return *this;} /** *

A boolean value indicating whether the subscription is enabled; * true indicates that the subscription is enabled.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

A boolean value indicating whether the subscription is enabled; * true indicates that the subscription is enabled.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

A boolean value indicating whether the subscription is enabled; * true indicates that the subscription is enabled.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

A boolean value indicating whether the subscription is enabled; * true indicates that the subscription is enabled.

*/ inline EventSubscription& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The list of tags for the event subscription.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The list of tags for the event subscription.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The list of tags for the event subscription.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The list of tags for the event subscription.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The list of tags for the event subscription.

*/ inline EventSubscription& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The list of tags for the event subscription.

*/ inline EventSubscription& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The list of tags for the event subscription.

*/ inline EventSubscription& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The list of tags for the event subscription.

*/ inline EventSubscription& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_customerAwsId; bool m_customerAwsIdHasBeenSet; Aws::String m_custSubscriptionId; bool m_custSubscriptionIdHasBeenSet; Aws::String m_snsTopicArn; bool m_snsTopicArnHasBeenSet; Aws::String m_status; bool m_statusHasBeenSet; Aws::Utils::DateTime m_subscriptionCreationTime; bool m_subscriptionCreationTimeHasBeenSet; Aws::String m_sourceType; bool m_sourceTypeHasBeenSet; Aws::Vector m_sourceIdsList; bool m_sourceIdsListHasBeenSet; Aws::Vector m_eventCategoriesList; bool m_eventCategoriesListHasBeenSet; Aws::String m_severity; bool m_severityHasBeenSet; bool m_enabled; bool m_enabledHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace Redshift } // namespace Aws