aws_sdk_waf/client/
get_sampled_requests.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetSampledRequests`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`web_acl_id(impl Into<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::web_acl_id) / [`set_web_acl_id(Option<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_web_acl_id):<br>required: **true**<br><p>The <code>WebACLId</code> of the <code>WebACL</code> for which you want <code>GetSampledRequests</code> to return a sample of requests.</p><br>
    ///   - [`rule_id(impl Into<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::rule_id) / [`set_rule_id(Option<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_rule_id):<br>required: **true**<br><p><code>RuleId</code> is one of three values:</p> <ul>  <li>   <p>The <code>RuleId</code> of the <code>Rule</code> or the <code>RuleGroupId</code> of the <code>RuleGroup</code> for which you want <code>GetSampledRequests</code> to return a sample of requests.</p></li>  <li>   <p><code>Default_Action</code>, which causes <code>GetSampledRequests</code> to return a sample of the requests that didn't match any of the rules in the specified <code>WebACL</code>.</p></li> </ul><br>
    ///   - [`time_window(TimeWindow)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::time_window) / [`set_time_window(Option<TimeWindow>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_time_window):<br>required: **true**<br><p>The start date and time and the end date and time of the range for which you want <code>GetSampledRequests</code> to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, <code>Z</code>. For example, <code>"2016-09-27T14:50Z"</code>. You can specify any time range in the previous three hours.</p><br>
    ///   - [`max_items(i64)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::max_items) / [`set_max_items(Option<i64>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_max_items):<br>required: **true**<br><p>The number of requests that you want AWS WAF to return from among the first 5,000 requests that your AWS resource received during the time range. If your resource received fewer requests than the value of <code>MaxItems</code>, <code>GetSampledRequests</code> returns information about all of them.</p><br>
    /// - On success, responds with [`GetSampledRequestsOutput`](crate::operation::get_sampled_requests::GetSampledRequestsOutput) with field(s):
    ///   - [`sampled_requests(Option<Vec::<SampledHttpRequest>>)`](crate::operation::get_sampled_requests::GetSampledRequestsOutput::sampled_requests): <p>A complex type that contains detailed information about each of the requests in the sample.</p>
    ///   - [`population_size(i64)`](crate::operation::get_sampled_requests::GetSampledRequestsOutput::population_size): <p>The total number of requests from which <code>GetSampledRequests</code> got a sample of <code>MaxItems</code> requests. If <code>PopulationSize</code> is less than <code>MaxItems</code>, the sample includes every request that your AWS resource received during the specified time range.</p>
    ///   - [`time_window(Option<TimeWindow>)`](crate::operation::get_sampled_requests::GetSampledRequestsOutput::time_window): <p>Usually, <code>TimeWindow</code> is the time range that you specified in the <code>GetSampledRequests</code> request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, <code>GetSampledRequests</code> returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.</p>
    /// - On failure, responds with [`SdkError<GetSampledRequestsError>`](crate::operation::get_sampled_requests::GetSampledRequestsError)
    pub fn get_sampled_requests(&self) -> crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder {
        crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::new(self.handle.clone())
    }
}