/** * 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 EventBridge { namespace Model { /** */ class PutRuleRequest : public EventBridgeRequest { public: AWS_EVENTBRIDGE_API PutRuleRequest(); // 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 "PutRule"; } AWS_EVENTBRIDGE_API Aws::String SerializePayload() const override; AWS_EVENTBRIDGE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The name of the rule that you are creating or updating.

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

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; } /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; } /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; } /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::move(value); } /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); } /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline PutRuleRequest& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;} /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline PutRuleRequest& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(std::move(value)); return *this;} /** *

The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 * minutes)".

*/ inline PutRuleRequest& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;} /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline const Aws::String& GetEventPattern() const{ return m_eventPattern; } /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; } /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline void SetEventPattern(const Aws::String& value) { m_eventPatternHasBeenSet = true; m_eventPattern = value; } /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline void SetEventPattern(Aws::String&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = std::move(value); } /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline void SetEventPattern(const char* value) { m_eventPatternHasBeenSet = true; m_eventPattern.assign(value); } /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline PutRuleRequest& WithEventPattern(const Aws::String& value) { SetEventPattern(value); return *this;} /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline PutRuleRequest& WithEventPattern(Aws::String&& value) { SetEventPattern(std::move(value)); return *this;} /** *

The event pattern. For more information, see Amazon * EventBridge event patterns in the Amazon EventBridge User Guide.

*/ inline PutRuleRequest& WithEventPattern(const char* value) { SetEventPattern(value); return *this;} /** *

Indicates whether the rule is enabled or disabled.

*/ inline const RuleState& GetState() const{ return m_state; } /** *

Indicates whether the rule is enabled or disabled.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

Indicates whether the rule is enabled or disabled.

*/ inline void SetState(const RuleState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

Indicates whether the rule is enabled or disabled.

*/ inline void SetState(RuleState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

Indicates whether the rule is enabled or disabled.

*/ inline PutRuleRequest& WithState(const RuleState& value) { SetState(value); return *this;} /** *

Indicates whether the rule is enabled or disabled.

*/ inline PutRuleRequest& WithState(RuleState&& value) { SetState(std::move(value)); return *this;} /** *

A description of the rule.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the rule.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the rule.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the rule.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the rule.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the rule.

*/ inline PutRuleRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the rule.

*/ inline PutRuleRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the rule.

*/ inline PutRuleRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline PutRuleRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline PutRuleRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

*

If you're setting an event bus in another account as the target and that * account granted permission to your account through an organization instead of * directly by the account ID, you must specify a RoleArn with proper * permissions in the Target structure, instead of here in this * parameter.

*/ inline PutRuleRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

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

The list of key-value pairs to associate with the rule.

*/ inline PutRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline const Aws::String& GetEventBusName() const{ return m_eventBusName; } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline bool EventBusNameHasBeenSet() const { return m_eventBusNameHasBeenSet; } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline void SetEventBusName(const Aws::String& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = value; } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline void SetEventBusName(Aws::String&& value) { m_eventBusNameHasBeenSet = true; m_eventBusName = std::move(value); } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline void SetEventBusName(const char* value) { m_eventBusNameHasBeenSet = true; m_eventBusName.assign(value); } /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline PutRuleRequest& WithEventBusName(const Aws::String& value) { SetEventBusName(value); return *this;} /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline PutRuleRequest& WithEventBusName(Aws::String&& value) { SetEventBusName(std::move(value)); return *this;} /** *

The name or ARN of the event bus to associate with this rule. If you omit * this, the default event bus is used.

*/ inline PutRuleRequest& WithEventBusName(const char* value) { SetEventBusName(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_scheduleExpression; bool m_scheduleExpressionHasBeenSet = false; Aws::String m_eventPattern; bool m_eventPatternHasBeenSet = false; RuleState m_state; bool m_stateHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_eventBusName; bool m_eventBusNameHasBeenSet = false; }; } // namespace Model } // namespace EventBridge } // namespace Aws