deleteUserHierarchyGroup method

Future<void> deleteUserHierarchyGroup({
  1. required String hierarchyGroupId,
  2. required String instanceId,
})

Deletes an existing user hierarchy group. It must not be associated with any agents or have any active child groups.

May throw InvalidRequestException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw ThrottlingException. May throw InternalServiceException.

Parameter hierarchyGroupId : The identifier of the hierarchy group.

Parameter instanceId : The identifier of the Amazon Connect instance.

Implementation

Future<void> deleteUserHierarchyGroup({
  required String hierarchyGroupId,
  required String instanceId,
}) async {
  ArgumentError.checkNotNull(hierarchyGroupId, 'hierarchyGroupId');
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/user-hierarchy-groups/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(hierarchyGroupId)}',
    exceptionFnMap: _exceptionFns,
  );
}