aws-sdk-route53resolver 1.111.0

AWS SDK for Amazon Route 53 Resolver
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFirewallConfigInput {
    /// <p>The ID of the VPC that the configuration is for.</p>
    pub resource_id: ::std::option::Option<::std::string::String>,
    /// <p>Determines how Route 53 Resolver handles queries during failures, for example when all traffic that is sent to DNS Firewall fails to receive a reply.</p>
    /// <ul>
    /// <li>
    /// <p>By default, fail open is disabled, which means the failure mode is closed. This approach favors security over availability. DNS Firewall blocks queries that it is unable to evaluate properly.</p></li>
    /// <li>
    /// <p>If you enable this option, the failure mode is open. This approach favors availability over security. DNS Firewall allows queries to proceed if it is unable to properly evaluate them.</p></li>
    /// </ul>
    /// <p>This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.</p>
    pub firewall_fail_open: ::std::option::Option<crate::types::FirewallFailOpenStatus>,
}
impl UpdateFirewallConfigInput {
    /// <p>The ID of the VPC that the configuration is for.</p>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>Determines how Route 53 Resolver handles queries during failures, for example when all traffic that is sent to DNS Firewall fails to receive a reply.</p>
    /// <ul>
    /// <li>
    /// <p>By default, fail open is disabled, which means the failure mode is closed. This approach favors security over availability. DNS Firewall blocks queries that it is unable to evaluate properly.</p></li>
    /// <li>
    /// <p>If you enable this option, the failure mode is open. This approach favors availability over security. DNS Firewall allows queries to proceed if it is unable to properly evaluate them.</p></li>
    /// </ul>
    /// <p>This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.</p>
    pub fn firewall_fail_open(&self) -> ::std::option::Option<&crate::types::FirewallFailOpenStatus> {
        self.firewall_fail_open.as_ref()
    }
}
impl UpdateFirewallConfigInput {
    /// Creates a new builder-style object to manufacture [`UpdateFirewallConfigInput`](crate::operation::update_firewall_config::UpdateFirewallConfigInput).
    pub fn builder() -> crate::operation::update_firewall_config::builders::UpdateFirewallConfigInputBuilder {
        crate::operation::update_firewall_config::builders::UpdateFirewallConfigInputBuilder::default()
    }
}

/// A builder for [`UpdateFirewallConfigInput`](crate::operation::update_firewall_config::UpdateFirewallConfigInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFirewallConfigInputBuilder {
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) firewall_fail_open: ::std::option::Option<crate::types::FirewallFailOpenStatus>,
}
impl UpdateFirewallConfigInputBuilder {
    /// <p>The ID of the VPC that the configuration is for.</p>
    /// This field is required.
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC that the configuration is for.</p>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>The ID of the VPC that the configuration is for.</p>
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_id
    }
    /// <p>Determines how Route 53 Resolver handles queries during failures, for example when all traffic that is sent to DNS Firewall fails to receive a reply.</p>
    /// <ul>
    /// <li>
    /// <p>By default, fail open is disabled, which means the failure mode is closed. This approach favors security over availability. DNS Firewall blocks queries that it is unable to evaluate properly.</p></li>
    /// <li>
    /// <p>If you enable this option, the failure mode is open. This approach favors availability over security. DNS Firewall allows queries to proceed if it is unable to properly evaluate them.</p></li>
    /// </ul>
    /// <p>This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.</p>
    /// This field is required.
    pub fn firewall_fail_open(mut self, input: crate::types::FirewallFailOpenStatus) -> Self {
        self.firewall_fail_open = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines how Route 53 Resolver handles queries during failures, for example when all traffic that is sent to DNS Firewall fails to receive a reply.</p>
    /// <ul>
    /// <li>
    /// <p>By default, fail open is disabled, which means the failure mode is closed. This approach favors security over availability. DNS Firewall blocks queries that it is unable to evaluate properly.</p></li>
    /// <li>
    /// <p>If you enable this option, the failure mode is open. This approach favors availability over security. DNS Firewall allows queries to proceed if it is unable to properly evaluate them.</p></li>
    /// </ul>
    /// <p>This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.</p>
    pub fn set_firewall_fail_open(mut self, input: ::std::option::Option<crate::types::FirewallFailOpenStatus>) -> Self {
        self.firewall_fail_open = input;
        self
    }
    /// <p>Determines how Route 53 Resolver handles queries during failures, for example when all traffic that is sent to DNS Firewall fails to receive a reply.</p>
    /// <ul>
    /// <li>
    /// <p>By default, fail open is disabled, which means the failure mode is closed. This approach favors security over availability. DNS Firewall blocks queries that it is unable to evaluate properly.</p></li>
    /// <li>
    /// <p>If you enable this option, the failure mode is open. This approach favors availability over security. DNS Firewall allows queries to proceed if it is unable to properly evaluate them.</p></li>
    /// </ul>
    /// <p>This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.</p>
    pub fn get_firewall_fail_open(&self) -> &::std::option::Option<crate::types::FirewallFailOpenStatus> {
        &self.firewall_fail_open
    }
    /// Consumes the builder and constructs a [`UpdateFirewallConfigInput`](crate::operation::update_firewall_config::UpdateFirewallConfigInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_firewall_config::UpdateFirewallConfigInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_firewall_config::UpdateFirewallConfigInput {
            resource_id: self.resource_id,
            firewall_fail_open: self.firewall_fail_open,
        })
    }
}