aws_sdk_fms/client/get_protection_status.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 [`GetProtectionStatus`](crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`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>
7 /// - [`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>
8 /// - [`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>
9 /// - [`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>
10 /// - [`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>
11 /// - [`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>
12 /// - On success, responds with [`GetProtectionStatusOutput`](crate::operation::get_protection_status::GetProtectionStatusOutput) with field(s):
13 /// - [`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>
14 /// - [`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>
15 /// - [`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>
16 /// - [`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>
17 /// - On failure, responds with [`SdkError<GetProtectionStatusError>`](crate::operation::get_protection_status::GetProtectionStatusError)
18 pub fn get_protection_status(&self) -> crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder {
19 crate::operation::get_protection_status::builders::GetProtectionStatusFluentBuilder::new(self.handle.clone())
20 }
21}