updateDNSView method

Future<UpdateDNSViewOutput> updateDNSView({
  1. required String dnsViewId,
  2. String? description,
  3. DnsSecValidationType? dnssecValidation,
  4. EdnsClientSubnetType? ednsClientSubnet,
  5. FirewallRulesFailOpenType? firewallRulesFailOpen,
  6. String? name,
})

Updates the configuration of a DNS view.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter dnsViewId : The unique identifier of the DNS view to update.

Parameter description : A description of the DNS view.

Parameter dnssecValidation : Whether to enable DNSSEC validation for the DNS view.

Parameter ednsClientSubnet : Whether to enable EDNS Client Subnet injection for the DNS view.

Parameter firewallRulesFailOpen : Whether firewall rules should fail open when they cannot be evaluated.

Parameter name : The name of the DNS view.

Implementation

Future<UpdateDNSViewOutput> updateDNSView({
  required String dnsViewId,
  String? description,
  DnsSecValidationType? dnssecValidation,
  EdnsClientSubnetType? ednsClientSubnet,
  FirewallRulesFailOpenType? firewallRulesFailOpen,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (dnssecValidation != null) 'dnssecValidation': dnssecValidation.value,
    if (ednsClientSubnet != null) 'ednsClientSubnet': ednsClientSubnet.value,
    if (firewallRulesFailOpen != null)
      'firewallRulesFailOpen': firewallRulesFailOpen.value,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/dns-views/${Uri.encodeComponent(dnsViewId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDNSViewOutput.fromJson(response);
}