associateIpGroups method

Future<void> associateIpGroups(
  1. {required String directoryId,
  2. required List<String> groupIds}
)

Associates the specified IP access control group with the specified directory.

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

Parameter directoryId : The identifier of the directory.

Parameter groupIds : The identifiers of one or more IP access control groups.

Implementation

Future<void> associateIpGroups({
  required String directoryId,
  required List<String> groupIds,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  _s.validateStringLength(
    'directoryId',
    directoryId,
    10,
    65,
    isRequired: true,
  );
  ArgumentError.checkNotNull(groupIds, 'groupIds');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.AssociateIpGroups'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'GroupIds': groupIds,
    },
  );
}