authorizeIpRules method

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

Adds one or more rules to the specified IP access control group.

This action gives users permission to access their WorkSpaces from the CIDR address ranges specified in the 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 : The rules to add to the group.

Implementation

Future<void> authorizeIpRules({
  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.AuthorizeIpRules'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GroupId': groupId,
      'UserRules': userRules,
    },
  );
}