updateRulesOfIpGroup method

Future<void> updateRulesOfIpGroup({
  1. required String groupId,
  2. required List<IpRuleItem> userRules,
})

Replaces the current rules of the specified IP access control group with the specified rules.

May throw InvalidParameterValuesException. May throw ResourceNotFoundException. May throw ResourceLimitExceededException. May throw InvalidResourceStateException. May throw AccessDeniedException.

Parameter groupId : The identifier of the group.

Parameter userRules : One or more rules.

Implementation

Future<void> updateRulesOfIpGroup({
  required String groupId,
  required List<IpRuleItem> userRules,
}) async {
  ArgumentError.checkNotNull(groupId, 'groupId');
  ArgumentError.checkNotNull(userRules, 'userRules');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.UpdateRulesOfIpGroup'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GroupId': groupId,
      'UserRules': userRules,
    },
  );
}