aws_sdk_wafv2/client/get_sampled_requests.rs
// 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_arn(impl Into<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::web_acl_arn) / [`set_web_acl_arn(Option<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_web_acl_arn):<br>required: **true**<br><p>The Amazon resource name (ARN) of the <code>WebACL</code> for which you want a sample of requests.</p><br>
/// - [`rule_metric_name(impl Into<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::rule_metric_name) / [`set_rule_metric_name(Option<String>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_rule_metric_name):<br>required: **true**<br><p>The metric name assigned to the <code>Rule</code> or <code>RuleGroup</code> dimension for which you want a sample of requests.</p><br>
/// - [`scope(Scope)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::get_sampled_requests::builders::GetSampledRequestsFluentBuilder::set_scope):<br>required: **true**<br><p>Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.</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>
/// - [`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. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.</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 WAF to return from among the first 5,000 requests that your Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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())
}
}