aws_sdk_wafv2/client/
get_managed_rule_set.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 [`GetManagedRuleSet`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::set_name):<br>required: **true**<br><p>The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.</p> <p>This name is assigned to the corresponding managed rule group, which your customers can access and use.</p><br>
7    ///   - [`scope(Scope)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::set_scope):<br>required: **true**<br><p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p> <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p> <ul>  <li>   <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>  <li>   <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li> </ul><br>
8    ///   - [`id(impl Into<String>)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::id) / [`set_id(Option<String>)`](crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::set_id):<br>required: **true**<br><p>A unique identifier for the managed rule set. The ID is returned in the responses to commands like <code>list</code>. You provide it to operations like <code>get</code> and <code>update</code>.</p><br>
9    /// - On success, responds with [`GetManagedRuleSetOutput`](crate::operation::get_managed_rule_set::GetManagedRuleSetOutput) with field(s):
10    ///   - [`managed_rule_set(Option<ManagedRuleSet>)`](crate::operation::get_managed_rule_set::GetManagedRuleSetOutput::managed_rule_set): <p>The managed rule set that you requested.</p>
11    ///   - [`lock_token(Option<String>)`](crate::operation::get_managed_rule_set::GetManagedRuleSetOutput::lock_token): <p>A token used for optimistic locking. WAF returns a token to your <code>get</code> and <code>list</code> requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like <code>update</code> and <code>delete</code>. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a <code>WAFOptimisticLockException</code>. If this happens, perform another <code>get</code>, and use the new token returned by that operation.</p>
12    /// - On failure, responds with [`SdkError<GetManagedRuleSetError>`](crate::operation::get_managed_rule_set::GetManagedRuleSetError)
13    pub fn get_managed_rule_set(&self) -> crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder {
14        crate::operation::get_managed_rule_set::builders::GetManagedRuleSetFluentBuilder::new(self.handle.clone())
15    }
16}