1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetProtectionStatus`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`policy_id(impl Into<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_policy_id):<br>required: **true**<br><p>The ID of the policy for which you want to get the attack information.</p><br>
    ///   - [`member_account_id(impl Into<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::member_account_id) / [`set_member_account_id(Option<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_member_account_id):<br>required: **false**<br><p>The Amazon Web Services account that is in scope of the policy that you want to get the details for.</p><br>
    ///   - [`start_time(DateTime)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::start_time) / [`set_start_time(Option<DateTime>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_start_time):<br>required: **false**<br><p>The start of the time period to query for the attacks. This is a <code>timestamp</code> type. The request syntax listing indicates a <code>number</code> type because the default used by Firewall Manager is Unix time in seconds. However, any valid <code>timestamp</code> format is allowed.</p><br>
    ///   - [`end_time(DateTime)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::end_time) / [`set_end_time(Option<DateTime>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_end_time):<br>required: **false**<br><p>The end of the time period to query for the attacks. This is a <code>timestamp</code> type. The request syntax listing indicates a <code>number</code> type because the default used by Firewall Manager is Unix time in seconds. However, any valid <code>timestamp</code> format is allowed.</p><br>
    ///   - [`next_token(impl Into<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_next_token):<br>required: **false**<br><p>If you specify a value for <code>MaxResults</code> and you have more objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response, which you can use to retrieve another group of objects. For the second and subsequent <code>GetProtectionStatus</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of objects.</p><br>
    ///   - [`max_results(i32)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::set_max_results):<br>required: **false**<br><p>Specifies the number of objects that you want Firewall Manager to return for this request. If you have more objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of objects.</p><br>
    /// - On success, responds with [`GetProtectionStatusOutput`](crate::operation::get_protection_status::GetProtectionStatusOutput) with field(s):
    ///   - [`admin_account_id(Option<String>)`](crate::operation::get_protection_status::GetProtectionStatusOutput::admin_account_id): <p>The ID of the Firewall Manager administrator account for this policy.</p>
    ///   - [`service_type(Option<SecurityServiceType>)`](crate::operation::get_protection_status::GetProtectionStatusOutput::service_type): <p>The service type that is protected by the policy. Currently, this is always <code>SHIELD_ADVANCED</code>.</p>
    ///   - [`data(Option<String>)`](crate::operation::get_protection_status::GetProtectionStatusOutput::data): <p>Details about the attack, including the following:</p> <ul>  <li>   <p>Attack type</p></li>  <li>   <p>Account ID</p></li>  <li>   <p>ARN of the resource attacked</p></li>  <li>   <p>Start time of the attack</p></li>  <li>   <p>End time of the attack (ongoing attacks will not have an end time)</p></li> </ul> <p>The details are in JSON format.</p>
    ///   - [`next_token(Option<String>)`](crate::operation::get_protection_status::GetProtectionStatusOutput::next_token): <p>If you have more objects than the number that you specified for <code>MaxResults</code> in the request, the response includes a <code>NextToken</code> value. To list more objects, submit another <code>GetProtectionStatus</code> request, and specify the <code>NextToken</code> value from the response in the <code>NextToken</code> value in the next request.</p> <p>Amazon Web Services SDKs provide auto-pagination that identify <code>NextToken</code> in a response and make subsequent request calls automatically on your behalf. However, this feature is not supported by <code>GetProtectionStatus</code>. You must submit subsequent requests with <code>NextToken</code> using your own processes.</p>
    /// - On failure, responds with [`SdkError<GetProtectionStatusError>`](crate::operation::get_protection_status::GetProtectionStatusError)
    pub fn get_protection_status(&self) -> crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder {
        crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::new(self.handle.clone())
    }
}