// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`PutRule`](crate::operation::put_rule::builders::PutRuleFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_name):<br>required: **true**<br><p>The name of the rule that you are creating or updating.</p><br>
/// - [`schedule_expression(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::schedule_expression) / [`set_schedule_expression(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_schedule_expression):<br>required: **false**<br><p>The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)".</p><br>
/// - [`event_pattern(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::event_pattern) / [`set_event_pattern(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_event_pattern):<br>required: **false**<br><p>The event pattern. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html">Amazon EventBridge event patterns</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p><br>
/// - [`state(RuleState)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::state) / [`set_state(Option<RuleState>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_state):<br>required: **false**<br><p>The state of the rule.</p> <p>Valid values include:</p> <ul> <li> <p><code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p></li> <li> <p><code>ENABLED</code>: The rule is enabled. EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p></li> <li> <p><code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail.</p> <p>Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events">Logging management events</a> in the <i>CloudTrail User Guide</i>, and <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail">Filtering management events from Amazon Web Services services</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p> <p>This value is only valid for rules on the <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses">default</a> event bus or <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html">custom event buses</a>. It does not apply to <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html">partner event buses</a>.</p></li> </ul><br>
/// - [`description(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_description):<br>required: **false**<br><p>A description of the rule.</p><br>
/// - [`role_arn(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the IAM role associated with the rule.</p> <p>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 <code>RoleArn</code> with proper permissions in the <code>Target</code> structure, instead of here in this parameter.</p><br>
/// - [`tags(Tag)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_tags):<br>required: **false**<br><p>The list of key-value pairs to associate with the rule.</p><br>
/// - [`event_bus_name(impl Into<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::event_bus_name) / [`set_event_bus_name(Option<String>)`](crate::operation::put_rule::builders::PutRuleFluentBuilder::set_event_bus_name):<br>required: **false**<br><p>The name or ARN of the event bus to associate with this rule. If you omit this, the default event bus is used.</p><br>
/// - On success, responds with [`PutRuleOutput`](crate::operation::put_rule::PutRuleOutput) with field(s):
/// - [`rule_arn(Option<String>)`](crate::operation::put_rule::PutRuleOutput::rule_arn): <p>The Amazon Resource Name (ARN) of the rule.</p>
/// - On failure, responds with [`SdkError<PutRuleError>`](crate::operation::put_rule::PutRuleError)
pub fn put_rule(&self) -> crate::operation::put_rule::builders::PutRuleFluentBuilder {
crate::operation::put_rule::builders::PutRuleFluentBuilder::new(self.handle.clone())
}
}