Skip to content

update_dns_view

update_dns_view(
    dns_view_id: ResourceId,
    *,
    config_overrides: Optional[Route53GlobalResolverClientConfig] = None,
    name: Optional[ResourceName] = None,
    description: Optional[ResourceDescription] = None,
    dnssec_validation: Optional[DnsSecValidationType] = None,
    edns_client_subnet: Optional[EdnsClientSubnetType] = None,
    firewall_rules_fail_open: Optional[FirewallRulesFailOpenType] = None,
) -> UpdateDNSViewOutput

Updates the configuration of a DNS view.

Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify --region us-east-2 on Amazon Web Services CLI commands.

Parameters:

Raises:

  • AccessDeniedException –

    You don't have permission to perform this operation. Check your IAM permissions and try again.

  • ConflictException –

    The request conflicts with the current state of the resource. This can occur when trying to modify a resource that is not in a valid state for the requested operation.

  • InternalServerException –

    An internal server error occurred. Try again later.

  • ResourceNotFoundException –

    The specified resource was not found. Verify the resource ID and try again.

  • ServiceQuotaExceededException –

    The request would exceed one or more service quotas. Check your current usage and quotas, then try again.

  • ThrottlingException –

    The request was throttled due to too many requests. Wait a moment and try again.

  • ValidationException –

    The input parameters are invalid. Check the parameter values and try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_route53globalresolver/_services/route53_global_resolver.py
def update_dns_view(
    self,
    dns_view_id: "capo_route53globalresolver.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[Route53GlobalResolverClientConfig] = None,
    name: Optional[
        "capo_route53globalresolver.types.resource_name.ResourceName"
    ] = None,
    description: Optional[
        "capo_route53globalresolver.types.resource_description.ResourceDescription"
    ] = None,
    dnssec_validation: Optional[
        "capo_route53globalresolver.types.dns_sec_validation_type.DnsSecValidationType"
    ] = None,
    edns_client_subnet: Optional[
        "capo_route53globalresolver.types.edns_client_subnet_type.EdnsClientSubnetType"
    ] = None,
    firewall_rules_fail_open: Optional[
        "capo_route53globalresolver.types.firewall_rules_fail_open_type.FirewallRulesFailOpenType"
    ] = None,
) -> "capo_route53globalresolver.types.update_dns_view_output.UpdateDNSViewOutput":
    """<p>Updates the configuration of a DNS view.</p> <important> <p>Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify <code>--region us-east-2</code> on Amazon Web Services CLI commands.</p> </important>

    Args:
        dns_view_id: <p>The unique identifier of the DNS view to update.</p>
        name: <p>The name of the DNS view.</p>
        description: <p>A description of the DNS view.</p>
        dnssec_validation: <p>Whether to enable DNSSEC validation for the DNS view.</p>
        edns_client_subnet: <p>Whether to enable EDNS Client Subnet injection for the DNS view.</p>
        firewall_rules_fail_open: <p>Whether firewall rules should fail open when they cannot be evaluated.</p>

    Raises:
        capo_route53globalresolver.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform this operation. Check your IAM permissions and try again.</p>
        capo_route53globalresolver.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. This can occur when trying to modify a resource that is not in a valid state for the requested operation.</p>
        capo_route53globalresolver.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
        capo_route53globalresolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource ID and try again.</p>
        capo_route53globalresolver.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed one or more service quotas. Check your current usage and quotas, then try again.</p>
        capo_route53globalresolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Wait a moment and try again.</p>
        capo_route53globalresolver.errors.validation_exception.ValidationException: <p>The input parameters are invalid. Check the parameter values and try again.</p>
        capo_route53globalresolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53globalresolver.types.update_dns_view_input.UpdateDNSViewInput]",
    ) -> OperationResponse[
        "capo_route53globalresolver.types.update_dns_view_output.UpdateDNSViewOutput"
    ]:
        import capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.update_dns_view

        output, http_response = (
            capo_route53globalresolver._operations.ec2_dns_global_resolver_customer_api.update_dns_view.update_dns_view(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDNSView")
    )
    input_: capo_route53globalresolver.types.update_dns_view_input.UpdateDNSViewInput = {
        "dns_view_id": dns_view_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if dnssec_validation is not None:
        input_["dnssec_validation"] = dnssec_validation
    if edns_client_subnet is not None:
        input_["edns_client_subnet"] = edns_client_subnet
    if firewall_rules_fail_open is not None:
        input_["firewall_rules_fail_open"] = firewall_rules_fail_open

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