updateResolverRule method

Future<UpdateResolverRuleResponse> updateResolverRule({
  1. required ResolverRuleConfig config,
  2. required String resolverRuleId,
})

Updates settings for a specified Resolver rule. ResolverRuleId is required, and all other parameters are optional. If you don't specify a parameter, it retains its current value.

May throw InvalidRequestException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw LimitExceededException. May throw InternalServiceErrorException. May throw ThrottlingException.

Parameter config : The new settings for the Resolver rule.

Parameter resolverRuleId : The ID of the Resolver rule that you want to update.

Implementation

Future<UpdateResolverRuleResponse> updateResolverRule({
  required ResolverRuleConfig config,
  required String resolverRuleId,
}) async {
  ArgumentError.checkNotNull(config, 'config');
  ArgumentError.checkNotNull(resolverRuleId, 'resolverRuleId');
  _s.validateStringLength(
    'resolverRuleId',
    resolverRuleId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.UpdateResolverRule'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Config': config,
      'ResolverRuleId': resolverRuleId,
    },
  );

  return UpdateResolverRuleResponse.fromJson(jsonResponse.body);
}