1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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>Amazon EventBridge User Guide</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>Indicates whether the rule is enabled or disabled.</p><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())
    }
}