aws_sdk_datazone/client/
create_rule.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateRule`](crate::operation::create_rule::builders::CreateRuleFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`domain_identifier(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::domain_identifier) / [`set_domain_identifier(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_domain_identifier):<br>required: **true**<br><p>The ID of the domain where the rule is created.</p><br>
7    ///   - [`name(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_name):<br>required: **true**<br><p>The name of the rule.</p><br>
8    ///   - [`target(RuleTarget)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::target) / [`set_target(Option<RuleTarget>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_target):<br>required: **true**<br><p>The target of the rule.</p><br>
9    ///   - [`action(RuleAction)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::action) / [`set_action(Option<RuleAction>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_action):<br>required: **true**<br><p>The action of the rule.</p><br>
10    ///   - [`scope(RuleScope)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::scope) / [`set_scope(Option<RuleScope>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_scope):<br>required: **true**<br><p>The scope of the rule.</p><br>
11    ///   - [`detail(RuleDetail)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::detail) / [`set_detail(Option<RuleDetail>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_detail):<br>required: **true**<br><p>The detail of the rule.</p><br>
12    ///   - [`description(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_description):<br>required: **false**<br><p>The description of the rule.</p><br>
13    ///   - [`client_token(impl Into<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_rule::builders::CreateRuleFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p><br>
14    /// - On success, responds with [`CreateRuleOutput`](crate::operation::create_rule::CreateRuleOutput) with field(s):
15    ///   - [`identifier(String)`](crate::operation::create_rule::CreateRuleOutput::identifier): <p>The ID of the rule.</p>
16    ///   - [`name(String)`](crate::operation::create_rule::CreateRuleOutput::name): <p>The name of the rule.</p>
17    ///   - [`rule_type(RuleType)`](crate::operation::create_rule::CreateRuleOutput::rule_type): <p>The type of the rule.</p>
18    ///   - [`target(Option<RuleTarget>)`](crate::operation::create_rule::CreateRuleOutput::target): <p>The target of the rule.</p>
19    ///   - [`action(RuleAction)`](crate::operation::create_rule::CreateRuleOutput::action): <p>The action of the rule.</p>
20    ///   - [`scope(Option<RuleScope>)`](crate::operation::create_rule::CreateRuleOutput::scope): <p>The scope of the rule.</p>
21    ///   - [`detail(Option<RuleDetail>)`](crate::operation::create_rule::CreateRuleOutput::detail): <p>The detail of the rule.</p>
22    ///   - [`target_type(Option<RuleTargetType>)`](crate::operation::create_rule::CreateRuleOutput::target_type): <p>The target type of the rule.</p>
23    ///   - [`description(Option<String>)`](crate::operation::create_rule::CreateRuleOutput::description): <p>The description of the rule.</p>
24    ///   - [`created_at(DateTime)`](crate::operation::create_rule::CreateRuleOutput::created_at): <p>The timestamp at which the rule is created.</p>
25    ///   - [`created_by(String)`](crate::operation::create_rule::CreateRuleOutput::created_by): <p>The user who creates the rule.</p>
26    /// - On failure, responds with [`SdkError<CreateRuleError>`](crate::operation::create_rule::CreateRuleError)
27    pub fn create_rule(&self) -> crate::operation::create_rule::builders::CreateRuleFluentBuilder {
28        crate::operation::create_rule::builders::CreateRuleFluentBuilder::new(self.handle.clone())
29    }
30}