updateResolverEndpoint method

Future<UpdateResolverEndpointResponse> updateResolverEndpoint({
  1. required String resolverEndpointId,
  2. bool? dns64Enabled,
  3. bool? ipv6InternetAccessEnabled,
  4. String? name,
  5. List<Protocol>? protocols,
  6. ResolverEndpointType? resolverEndpointType,
  7. bool? rniEnhancedMetricsEnabled,
  8. bool? targetNameServerMetricsEnabled,
  9. List<UpdateIpAddress>? updateIpAddresses,
})

Updates the name, or endpoint type for an inbound or an outbound Resolver endpoint. You can only update between IPV4 and DUALSTACK, IPV6 endpoint type can't be updated to other type.

May throw AccessDeniedException. May throw InternalServiceErrorException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter resolverEndpointId : The ID of the Resolver endpoint that you want to update.

Parameter dns64Enabled : Specifies whether DNS64 is enabled for the inbound Resolver endpoint. When set to true, Route 53 Resolver synthesizes AAAA (IPv6) records for IPv4-only services by prepending the 64:ff9b::/96 prefix to the IPv4 address. This enables IPv6-only clients that send queries through the inbound endpoint to reach IPv4-only services. DNS64 works with NAT64 to provide complete IPv6-to-IPv4 translation.

Parameter ipv6InternetAccessEnabled : Specifies whether IPv6 internet access is enabled for the outbound Resolver endpoint. When set to true, the endpoint elastic network interfaces (ENIs) can forward DNS queries to public IPv6 targets through an internet gateway.

Parameter name : The name of the Resolver endpoint that you want to update.

Parameter protocols : The protocols you want to use for the endpoint. DoH-FIPS is applicable for default inbound endpoints only.

For a default inbound endpoint you can apply the protocols as follows:

  • Do53 and DoH in combination.
  • Do53 and DoH-FIPS in combination.
  • Do53 alone.
  • DoH alone.
  • DoH-FIPS alone.
  • None, which is treated as Do53.
For a delegation inbound endpoint you can use Do53 only.

For an outbound endpoint you can apply the protocols as follows:

  • Do53 and DoH in combination.
  • Do53 alone.
  • DoH alone.
  • None, which is treated as Do53.

Parameter resolverEndpointType : Specifies the endpoint type for what type of IP address the endpoint uses to forward DNS queries.

Updating to IPV6 type isn't currently supported.

Parameter rniEnhancedMetricsEnabled : Updates whether RNI enhanced metrics are enabled for the Resolver endpoints. When set to true, one-minute granular metrics are published in CloudWatch for each RNI associated with this endpoint. When set to false, metrics are not published.

Parameter targetNameServerMetricsEnabled : Updates whether target name server metrics are enabled for the outbound Resolver endpoints. When set to true, one-minute granular metrics are published in CloudWatch for each target name server associated with this endpoint. When set to false, metrics are not published. This setting is not supported for inbound Resolver endpoints.

Parameter updateIpAddresses : Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to dual-stack. If you don't specify an IPv6 address, one will be automatically chosen from your subnet.

Implementation

Future<UpdateResolverEndpointResponse> updateResolverEndpoint({
  required String resolverEndpointId,
  bool? dns64Enabled,
  bool? ipv6InternetAccessEnabled,
  String? name,
  List<Protocol>? protocols,
  ResolverEndpointType? resolverEndpointType,
  bool? rniEnhancedMetricsEnabled,
  bool? targetNameServerMetricsEnabled,
  List<UpdateIpAddress>? updateIpAddresses,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.UpdateResolverEndpoint'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResolverEndpointId': resolverEndpointId,
      if (dns64Enabled != null) 'Dns64Enabled': dns64Enabled,
      if (ipv6InternetAccessEnabled != null)
        'Ipv6InternetAccessEnabled': ipv6InternetAccessEnabled,
      if (name != null) 'Name': name,
      if (protocols != null)
        'Protocols': protocols.map((e) => e.value).toList(),
      if (resolverEndpointType != null)
        'ResolverEndpointType': resolverEndpointType.value,
      if (rniEnhancedMetricsEnabled != null)
        'RniEnhancedMetricsEnabled': rniEnhancedMetricsEnabled,
      if (targetNameServerMetricsEnabled != null)
        'TargetNameServerMetricsEnabled': targetNameServerMetricsEnabled,
      if (updateIpAddresses != null) 'UpdateIpAddresses': updateIpAddresses,
    },
  );

  return UpdateResolverEndpointResponse.fromJson(jsonResponse.body);
}