aws_sdk_rbin/client/
lock_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 [`LockRule`](crate::operation::lock_rule::builders::LockRuleFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`identifier(impl Into<String>)`](crate::operation::lock_rule::builders::LockRuleFluentBuilder::identifier) / [`set_identifier(Option<String>)`](crate::operation::lock_rule::builders::LockRuleFluentBuilder::set_identifier):<br>required: **true**<br><p>The unique ID of the retention rule.</p><br>
7    ///   - [`lock_configuration(LockConfiguration)`](crate::operation::lock_rule::builders::LockRuleFluentBuilder::lock_configuration) / [`set_lock_configuration(Option<LockConfiguration>)`](crate::operation::lock_rule::builders::LockRuleFluentBuilder::set_lock_configuration):<br>required: **true**<br><p>Information about the retention rule lock configuration.</p><br>
8    /// - On success, responds with [`LockRuleOutput`](crate::operation::lock_rule::LockRuleOutput) with field(s):
9    ///   - [`identifier(Option<String>)`](crate::operation::lock_rule::LockRuleOutput::identifier): <p>The unique ID of the retention rule.</p>
10    ///   - [`description(Option<String>)`](crate::operation::lock_rule::LockRuleOutput::description): <p>The retention rule description.</p>
11    ///   - [`resource_type(Option<ResourceType>)`](crate::operation::lock_rule::LockRuleOutput::resource_type): <p>The resource type retained by the retention rule.</p>
12    ///   - [`retention_period(Option<RetentionPeriod>)`](crate::operation::lock_rule::LockRuleOutput::retention_period): <p>Information about the retention period for which the retention rule is to retain resources.</p>
13    ///   - [`resource_tags(Option<Vec::<ResourceTag>>)`](crate::operation::lock_rule::LockRuleOutput::resource_tags): <p>\[Tag-level retention rules only\] Information about the resource tags used to identify resources that are retained by the retention rule.</p>
14    ///   - [`status(Option<RuleStatus>)`](crate::operation::lock_rule::LockRuleOutput::status): <p>The state of the retention rule. Only retention rules that are in the <code>available</code> state retain resources.</p>
15    ///   - [`lock_configuration(Option<LockConfiguration>)`](crate::operation::lock_rule::LockRuleOutput::lock_configuration): <p>Information about the retention rule lock configuration.</p>
16    ///   - [`lock_state(Option<LockState>)`](crate::operation::lock_rule::LockRuleOutput::lock_state): <p>\[Region-level retention rules only\] The lock state for the retention rule.</p> <ul>  <li>   <p><code>locked</code> - The retention rule is locked and can't be modified or deleted.</p></li>  <li>   <p><code>pending_unlock</code> - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.</p></li>  <li>   <p><code>unlocked</code> - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.</p></li>  <li>   <p><code>null</code> - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the <code>locked</code> and <code>unlocked</code> states only; it can never transition back to <code>null</code>.</p></li> </ul>
17    ///   - [`rule_arn(Option<String>)`](crate::operation::lock_rule::LockRuleOutput::rule_arn): <p>The Amazon Resource Name (ARN) of the retention rule.</p>
18    ///   - [`exclude_resource_tags(Option<Vec::<ResourceTag>>)`](crate::operation::lock_rule::LockRuleOutput::exclude_resource_tags): <p>\[Region-level retention rules only\] Information about the exclusion tags used to identify resources that are to be excluded, or ignored, by the retention rule.</p>
19    /// - On failure, responds with [`SdkError<LockRuleError>`](crate::operation::lock_rule::LockRuleError)
20    pub fn lock_rule(&self) -> crate::operation::lock_rule::builders::LockRuleFluentBuilder {
21        crate::operation::lock_rule::builders::LockRuleFluentBuilder::new(self.handle.clone())
22    }
23}