updateUserHierarchyStructure method

Future<void> updateUserHierarchyStructure({
  1. required HierarchyStructureUpdate hierarchyStructure,
  2. required String instanceId,
})

Updates the user hierarchy structure: add, remove, and rename user hierarchy levels.

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

Parameter hierarchyStructure : The hierarchy levels to update.

Parameter instanceId : The identifier of the Amazon Connect instance.

Implementation

Future<void> updateUserHierarchyStructure({
  required HierarchyStructureUpdate hierarchyStructure,
  required String instanceId,
}) async {
  ArgumentError.checkNotNull(hierarchyStructure, 'hierarchyStructure');
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'HierarchyStructure': hierarchyStructure,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/user-hierarchy-structure/${Uri.encodeComponent(instanceId)}',
    exceptionFnMap: _exceptionFns,
  );
}