/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Neptune { namespace Model { /** */ class CreateEventSubscriptionRequest : public NeptuneRequest { public: AWS_NEPTUNE_API CreateEventSubscriptionRequest(); // 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 "CreateEventSubscription"; } AWS_NEPTUNE_API Aws::String SerializePayload() const override; protected: AWS_NEPTUNE_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline const Aws::String& GetSubscriptionName() const{ return m_subscriptionName; } /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline bool SubscriptionNameHasBeenSet() const { return m_subscriptionNameHasBeenSet; } /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline void SetSubscriptionName(const Aws::String& value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName = value; } /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline void SetSubscriptionName(Aws::String&& value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName = std::move(value); } /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline void SetSubscriptionName(const char* value) { m_subscriptionNameHasBeenSet = true; m_subscriptionName.assign(value); } /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline CreateEventSubscriptionRequest& WithSubscriptionName(const Aws::String& value) { SetSubscriptionName(value); return *this;} /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline CreateEventSubscriptionRequest& WithSubscriptionName(Aws::String&& value) { SetSubscriptionName(std::move(value)); return *this;} /** *

The name of the subscription.

Constraints: The name must be less than * 255 characters.

*/ inline CreateEventSubscriptionRequest& WithSubscriptionName(const char* value) { SetSubscriptionName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The Amazon Resource Name (ARN) of the SNS topic created for event * notification. The ARN is created by Amazon SNS when you create a topic and * subscribe to it.

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

The type of source that is generating the events. For example, if you want to * be notified of events generated by a DB instance, you would set this parameter * to db-instance. if this value is not specified, all events are returned.

*

Valid values: db-instance | db-cluster | * db-parameter-group | db-security-group | * db-snapshot | db-cluster-snapshot

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

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline const Aws::Vector& GetEventCategories() const{ return m_eventCategories; } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline bool EventCategoriesHasBeenSet() const { return m_eventCategoriesHasBeenSet; } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline void SetEventCategories(const Aws::Vector& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline void SetEventCategories(Aws::Vector&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = std::move(value); } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline CreateEventSubscriptionRequest& WithEventCategories(const Aws::Vector& value) { SetEventCategories(value); return *this;} /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline CreateEventSubscriptionRequest& WithEventCategories(Aws::Vector&& value) { SetEventCategories(std::move(value)); return *this;} /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline CreateEventSubscriptionRequest& AddEventCategories(const Aws::String& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline CreateEventSubscriptionRequest& AddEventCategories(Aws::String&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(std::move(value)); return *this; } /** *

A list of event categories for a SourceType that you want to subscribe to. * You can see a list of the categories for a given SourceType by using the * DescribeEventCategories action.

*/ inline CreateEventSubscriptionRequest& AddEventCategories(const char* value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline const Aws::Vector& GetSourceIds() const{ return m_sourceIds; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline bool SourceIdsHasBeenSet() const { return m_sourceIdsHasBeenSet; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline void SetSourceIds(const Aws::Vector& value) { m_sourceIdsHasBeenSet = true; m_sourceIds = value; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline void SetSourceIds(Aws::Vector&& value) { m_sourceIdsHasBeenSet = true; m_sourceIds = std::move(value); } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline CreateEventSubscriptionRequest& WithSourceIds(const Aws::Vector& value) { SetSourceIds(value); return *this;} /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline CreateEventSubscriptionRequest& WithSourceIds(Aws::Vector&& value) { SetSourceIds(std::move(value)); return *this;} /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline CreateEventSubscriptionRequest& AddSourceIds(const Aws::String& value) { m_sourceIdsHasBeenSet = true; m_sourceIds.push_back(value); return *this; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline CreateEventSubscriptionRequest& AddSourceIds(Aws::String&& value) { m_sourceIdsHasBeenSet = true; m_sourceIds.push_back(std::move(value)); return *this; } /** *

The list of identifiers of the event sources for which events are returned. * If not specified, then all sources are included in the response. An identifier * must begin with a letter and must contain only ASCII letters, digits, and * hyphens; it can't end with a hyphen or contain two consecutive hyphens.

*

Constraints:

  • If SourceIds are supplied, SourceType must also * be provided.

  • If the source type is a DB instance, then a * DBInstanceIdentifier must be supplied.

  • If the * source type is a DB security group, a DBSecurityGroupName must be * supplied.

  • If the source type is a DB parameter group, a * DBParameterGroupName must be supplied.

  • If the * source type is a DB snapshot, a DBSnapshotIdentifier must be * supplied.

*/ inline CreateEventSubscriptionRequest& AddSourceIds(const char* value) { m_sourceIdsHasBeenSet = true; m_sourceIds.push_back(value); return *this; } /** *

A Boolean value; set to true to activate the subscription, set to * false to create the subscription but not active it.

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

A Boolean value; set to true to activate the subscription, set to * false to create the subscription but not active it.

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

A Boolean value; set to true to activate the subscription, set to * false to create the subscription but not active it.

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

A Boolean value; set to true to activate the subscription, set to * false to create the subscription but not active it.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

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

The tags to be applied to the new event subscription.

*/ inline CreateEventSubscriptionRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_subscriptionName; bool m_subscriptionNameHasBeenSet = false; Aws::String m_snsTopicArn; bool m_snsTopicArnHasBeenSet = false; Aws::String m_sourceType; bool m_sourceTypeHasBeenSet = false; Aws::Vector m_eventCategories; bool m_eventCategoriesHasBeenSet = false; Aws::Vector m_sourceIds; bool m_sourceIdsHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Neptune } // namespace Aws