Skip to content

update_firewall_config

update_firewall_config(
    resource_id: ResourceId,
    firewall_fail_open: FirewallFailOpenStatus,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
) -> UpdateFirewallConfigResponse

Updates the configuration of the firewall behavior provided by DNS Firewall for a single VPC from Amazon Virtual Private Cloud (Amazon VPC).

Parameters:

  • resource_id (ResourceId) –

    The ID of the VPC that the configuration is for.

  • firewall_fail_open (FirewallFailOpenStatus) –

    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.

    • 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.

    • 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.

    This behavior is only enforced for VPCs that have at least one DNS Firewall rule group association.

Raises:

  • AccessDeniedException –

    The current account doesn't have the IAM permissions required to perform the specified Resolver operation.

    This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.

  • InternalServiceErrorException –

    We encountered an unknown error. Try again in a few minutes.

  • ResourceNotFoundException –

    The specified resource doesn't exist.

  • ThrottlingException –

    The request was throttled. Try again in a few minutes.

  • ValidationException –

    You have provided an invalid command. If you ran the UpdateFirewallDomains request. supported values are ADD, REMOVE, or REPLACE a domain.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
def update_firewall_config(
    self,
    resource_id: "capo_route53resolver.types.resource_id.ResourceId",
    firewall_fail_open: "capo_route53resolver.types.firewall_fail_open_status.FirewallFailOpenStatus",
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
) -> "capo_route53resolver.types.update_firewall_config_response.UpdateFirewallConfigResponse":
    """<p>Updates the configuration of the firewall behavior provided by DNS Firewall for a single VPC from Amazon Virtual Private Cloud (Amazon VPC). </p>

    Args:
        resource_id: <p>The ID of the VPC that the configuration is for.</p>
        firewall_fail_open: <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>

    Raises:
        capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_route53resolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Try again in a few minutes.</p>
        capo_route53resolver.errors.validation_exception.ValidationException: <p>You have provided an invalid command. If you ran the <code>UpdateFirewallDomains</code> request. supported values are <code>ADD</code>, <code>REMOVE</code>, or <code>REPLACE</code> a domain.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53resolver.types.update_firewall_config_request.UpdateFirewallConfigRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.update_firewall_config_response.UpdateFirewallConfigResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.update_firewall_config

        output, http_response = (
            capo_route53resolver._operations.route53_resolver.update_firewall_config.update_firewall_config(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFirewallConfig")
    )
    input_: capo_route53resolver.types.update_firewall_config_request.UpdateFirewallConfigRequest = {
        "resource_id": resource_id,
        "firewall_fail_open": firewall_fail_open,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output